Integrand size = 21, antiderivative size = 49 \[ \int \cos ^2(c+d x) (a+b \tan (c+d x))^2 \, dx=\frac {1}{2} \left (a^2+b^2\right ) x-\frac {\cos ^2(c+d x) (b-a \tan (c+d x)) (a+b \tan (c+d x))}{2 d} \]
[Out]
Time = 0.06 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3587, 737, 209} \[ \int \cos ^2(c+d x) (a+b \tan (c+d x))^2 \, dx=\frac {1}{2} x \left (a^2+b^2\right )-\frac {\cos ^2(c+d x) (b-a \tan (c+d x)) (a+b \tan (c+d x))}{2 d} \]
[In]
[Out]
Rule 209
Rule 737
Rule 3587
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {(a+x)^2}{\left (1+\frac {x^2}{b^2}\right )^2} \, dx,x,b \tan (c+d x)\right )}{b d} \\ & = -\frac {\cos ^2(c+d x) (b-a \tan (c+d x)) (a+b \tan (c+d x))}{2 d}+\frac {\left (a^2+b^2\right ) \text {Subst}\left (\int \frac {1}{1+\frac {x^2}{b^2}} \, dx,x,b \tan (c+d x)\right )}{2 b d} \\ & = \frac {1}{2} \left (a^2+b^2\right ) x-\frac {\cos ^2(c+d x) (b-a \tan (c+d x)) (a+b \tan (c+d x))}{2 d} \\ \end{align*}
Time = 0.45 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.06 \[ \int \cos ^2(c+d x) (a+b \tan (c+d x))^2 \, dx=\frac {2 \left (a^2+b^2\right ) (c+d x)-2 a b \cos (2 (c+d x))+\left (a^2-b^2\right ) \sin (2 (c+d x))}{4 d} \]
[In]
[Out]
Time = 2.00 (sec) , antiderivative size = 64, normalized size of antiderivative = 1.31
method | result | size |
risch | \(\frac {a^{2} x}{2}+\frac {b^{2} x}{2}-\frac {a b \cos \left (2 d x +2 c \right )}{2 d}+\frac {\sin \left (2 d x +2 c \right ) a^{2}}{4 d}-\frac {\sin \left (2 d x +2 c \right ) b^{2}}{4 d}\) | \(64\) |
derivativedivides | \(\frac {b^{2} \left (-\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )-a b \left (\cos ^{2}\left (d x +c \right )\right )+a^{2} \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) | \(70\) |
default | \(\frac {b^{2} \left (-\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )-a b \left (\cos ^{2}\left (d x +c \right )\right )+a^{2} \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) | \(70\) |
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.06 \[ \int \cos ^2(c+d x) (a+b \tan (c+d x))^2 \, dx=-\frac {2 \, a b \cos \left (d x + c\right )^{2} - {\left (a^{2} + b^{2}\right )} d x - {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right ) \sin \left (d x + c\right )}{2 \, d} \]
[In]
[Out]
\[ \int \cos ^2(c+d x) (a+b \tan (c+d x))^2 \, dx=\int \left (a + b \tan {\left (c + d x \right )}\right )^{2} \cos ^{2}{\left (c + d x \right )}\, dx \]
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.12 \[ \int \cos ^2(c+d x) (a+b \tan (c+d x))^2 \, dx=\frac {{\left (a^{2} + b^{2}\right )} {\left (d x + c\right )} - \frac {2 \, a b - {\left (a^{2} - b^{2}\right )} \tan \left (d x + c\right )}{\tan \left (d x + c\right )^{2} + 1}}{2 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 245 vs. \(2 (46) = 92\).
Time = 0.50 (sec) , antiderivative size = 245, normalized size of antiderivative = 5.00 \[ \int \cos ^2(c+d x) (a+b \tan (c+d x))^2 \, dx=\frac {a^{2} d x \tan \left (d x\right )^{2} \tan \left (c\right )^{2} + b^{2} d x \tan \left (d x\right )^{2} \tan \left (c\right )^{2} + a^{2} d x \tan \left (d x\right )^{2} + b^{2} d x \tan \left (d x\right )^{2} + a^{2} d x \tan \left (c\right )^{2} + b^{2} d x \tan \left (c\right )^{2} - a b \tan \left (d x\right )^{2} \tan \left (c\right )^{2} - a^{2} \tan \left (d x\right )^{2} \tan \left (c\right ) + b^{2} \tan \left (d x\right )^{2} \tan \left (c\right ) - a^{2} \tan \left (d x\right ) \tan \left (c\right )^{2} + b^{2} \tan \left (d x\right ) \tan \left (c\right )^{2} + a^{2} d x + b^{2} d x + a b \tan \left (d x\right )^{2} + 4 \, a b \tan \left (d x\right ) \tan \left (c\right ) + a b \tan \left (c\right )^{2} + a^{2} \tan \left (d x\right ) - b^{2} \tan \left (d x\right ) + a^{2} \tan \left (c\right ) - b^{2} \tan \left (c\right ) - a b}{2 \, {\left (d \tan \left (d x\right )^{2} \tan \left (c\right )^{2} + d \tan \left (d x\right )^{2} + d \tan \left (c\right )^{2} + d\right )}} \]
[In]
[Out]
Time = 3.99 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.02 \[ \int \cos ^2(c+d x) (a+b \tan (c+d x))^2 \, dx=x\,\left (\frac {a^2}{2}+\frac {b^2}{2}\right )-\frac {{\cos \left (c+d\,x\right )}^2\,\left (a\,b-\mathrm {tan}\left (c+d\,x\right )\,\left (\frac {a^2}{2}-\frac {b^2}{2}\right )\right )}{d} \]
[In]
[Out]